<div class="row-fluid">
	<div class="span11 offset1">
		<form action="<?php echo BASE_URL?>map-management/edit-district" method="post" class="form-horizontal">
			<div class="control-group">
				<label class="control-label" for="provinceName">Province Name</label>
				<div class="controls">
					<select name="data[district][province_id]" class="input-large" required>
						<option value="">Select Province</option>
						<?php 
							foreach ($provinces as $province){
								echo '<option value="' . $province -> id . '"' . ($record -> province_id == $province -> id?" selected='selected'":'') . '>' . $province -> province_name . '</option>';
							}
						?>
					</select>
				</div>
			</div>
			 <div class="control-group">
				<label class="control-label" for="districtName">District Name</label>
				<div class="controls">
					<input type="text" id="districtName" placeholder="Dictrict Name" name="data[district][district_name]" class="input-xxlarge" value="<?php echo $record -> district_name ?>" required>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="Alias">Alias</label>
				<div class="controls">
					<input type="text" id="Alias" placeholder="Alias" name="data[district][alias]" class="input-xxlarge" value="<?php echo $record -> alias ?>" required>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="areaShape">Area Shape</label>
				<div class="controls">
					<?php 
						if( $record -> shape == "rect"){
					?>
					<div class="btn-group" data-toggle="buttons-radio">
					    <label class="btn active">
					        <input type="radio" name="data[district][shape]" id="rect" value="rect" checked> Rectangle
					    </label>
					    <label class="btn">
					        <input type="radio" name="data[district][shape]" id="circle" value="circle"> Circle
					    </label>
					     <label class="btn">
					        <input type="radio" name="data[district][shape]" id="poly" value="poly"> Poly
					    </label>
					</div>
					<?php }else if($record -> shape == "circle"){?>
						<div class="btn-group" data-toggle="buttons-radio">
						    <label class="btn">
						        <input type="radio" name="data[district][shape]" id="rect" value="rect"> Rectangle
						    </label>
						    <label class="btn active">
						        <input type="radio" name="data[district][shape]" id="circle" value="circle" checked> Circle
						    </label>
						     <label class="btn">
						        <input type="radio" name="data[district][shape]" id="poly" value="poly"> Poly
						    </label>
						</div>
					<?php }else{?>
						<div class="btn-group" data-toggle="buttons-radio">
						    <label class="btn">
						        <input type="radio" name="data[district][shape]" id="rect" value="rect"> Rectangle
						    </label>
						    <label class="btn">
						        <input type="radio" name="data[district][shape]" id="circle" value="circle"> Circle
						    </label>
						     <label class="btn active">
						        <input type="radio" name="data[district][shape]" id="poly" value="poly" checked> Poly
						    </label>
						</div>
					<?php }?>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="districtLatLon">Latitue &amp; Langtitute</label>
				<div class="controls">
					<input type="text" id="districtLatLon" placeholder="lat & lon" name="data[district][lat_lon]" class="input-xxlarge" value="<?php echo $record -> lat_lon ?>" required>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="districtColor">Color</label>
				<div class="controls">
					<input type="text" id="districtColor" placeholder="Color" name="data[district][color]" class="input-xxlarge" value="<?php echo $record -> color ?>" required>
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<button type="submit" class="btn">Update</button>
					<button type="button" class="btn" onclick="javascript:history.go(-1)">Cancel</button>
				</div>
			</div>
			<input type="hidden" name="data[district][id]" value="<?php echo $record -> id ?>">
		</form>
	</div>
</div>

